<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta content="always" name="referrer">
<meta charset="utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<!-- 移动端必须的设置 -->
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<!-- 禁用电话号码检测功能，禁止对数字随便可以拨号 -->
<meta name="format-detection" content="telephone=no">
<!-- 禁用E-mail检测功能 -->
<meta name="format-detection" content="email=no">
<!-- 禁用地址检测功能，禁止跳转到地图 -->
<meta name="format-detection" content="address=no">
<!-- 在苹果设备上以全屏方式打开本网页 -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- 设置在苹果设备上状态的颜色，默认白色，要设置成什么颜色以Web颜色的风格而定 -->
<meta name="apple-mobile-web-app-status-bar-style" content="white">
<title>途狗收油</title>
<script type="text/javascript" src="../js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../js/base64.js"></script>
<script type="text/javascript" src="../js/layui/layui.js "></script>
<script type="text/javascript" src="../js/recycle/recyclebase.js"></script>
<script type="text/javascript" src="../vendor/resize.js"></script>
<link rel="stylesheet" href="../js/layui/css/layui.css" />
<link rel="stylesheet"
	href="../vendor/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" href="../css/basestyle.css" />
<link rel="stylesheet" href="../css/order-details.css" />
</head>
<body>
<%@ include file="../basejsp.jsp"%>
	<div class="header">
		<div class="header-top">
			<a href="../weixinuser/record.jsp"><i class="fa fa-angle-left"></i></a> <span>订单详情</span> <i
				class="fa "></i>
		</div>
	</div>
	<div class="main">
		<div class="top">
			<p></p>
		</div>
		<div class="center">
			<div class="time">
				<span>订单信息</span>
				<p></p>
				<p></p>
			</div>
			<div class="information">
				<span>收油员信息</span>
				<p>收油人员:</p>
				<p>联系电话:12345678901</p>
				<p>公司名称:重庆阿尔发石油化工有限公司</p>
			</div>
			<div class="num">
				<div class="income">
					<p>
						<img src="../img/cangray@2x.png" /> <span>预收桶数</span>
					</p>
					<div class="number">
						<h2 id="number1"></h2>
						<span>桶</span>
					</div>
				</div>
				<i></i>
				<div class="income">
					<p>
						<img src="../img/canyellow@2x.png" /> <span>实收桶数</span>
					</p>
					<div class="number">
						<h2 id="number2"></h2>
						<span>桶</span>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="bottom">
		<a href="tel:18883573989"> <img src="../img/iphon@2x.png" />
		</a>
	</div>
	<script type="text/javascript">
	<%String orderid = (String) request.getParameter("orderid");%>
	$(function() {
		layui.use('layer', function(){
		})
		findlist(getCookie("useriphone"), <%=orderid%>, 10)
	})
	function findlist(phone,orderid,roleId) {
	layui.use('layer', function(){
		layer.load(2, {time: 1*1000})
	})
	var json = {
			"filterscount": "0",
			"groupscount": "0",
			"pagenum": "0",//页数
			"pagesize": "0",//条数
			"recordstartindex": "0",
			"recordendindex": "0",
			"roleId": "10",//角色id
			"phone": "18883753989",
			"iphone": "18883753989"
	}
	var jsonstr = "filterscount=0&groupscount=0&pagenum=0&pagesize=50&recordstartindex=0&recordendindex=50&roleId="+roleId+"&phone="+phone+"&iphone="+phone+"&orderid="+orderid+"";
	$.ajax({
		cache: false,
		type: "post",
		datatype: 'json',
		contentType: 'application/json;charset=UTF-8',
		data: jsonstr,
		url: ''+httpipstr+'alfa-mobile-ws/rest/order/findlist?mobiletoken='+getCookie("mobiletokenuser")+'',
		success: function(data) {
				if(data.total=="0"){
				}else{
					$.each(data.rows, function (n, value) {
						$(".time").find("p").eq(0).html("发布时间："+value.createdDt+"")
						$(".time").find("p").eq(1).html("收油地址："+value.address+"")
						$("#number1").html((!value.num ||value.num=="undefined"? "0" : ""+value.num+""))
						$("#number2").html((!value.realnum ||value.realnum=="undefined"? "0" : ""+value.realnum+""))
						$(".information").find("p").eq(0).html((!value.realname ||value.realname=="undefined"? "收油人员:" : "联系人:"+value.realname+""))
						$(".information").find("p").eq(1).html((!value.phone ||value.phone=="undefined"? "联系电话:" : "联系电话:"+value.phone+""))
						$(".bottom").find("a").attr("href","tel:"+value.phone+"")
						if(value.orgstatus=="2"){
							$(".top").find("p").html("派送中...")
						}else if(value.orgstatus=="3"){
							$(".top").find("p").html("结算中...")
						}else if(value.orgstatus=="4"){
							$(".top").find("p").html("已结束")
						}else if(value.orgstatus=="1"){
							$(".top").find("p").html("派送中...")
							$(".information").find("p").remove();
							$(".information").append("<p>业务员暂时为接单，请稍后...</p>")
						}
					})
				}
		}
	});
}
	</script>
</body>
</html>